package rudy.elevator.thread;

import rudy.elevator.ui.MainPanel;
import rudy.elevator.bean.LiftBean;

public class UpLift extends Thread {
    private MainPanel  panel;
    public UpLift(MainPanel  panel) {
          this.panel = panel;
    }
    public synchronized void run()
    {
        LiftBean lifts[] = panel.getLiftbean();
        UpThread th [] = new UpThread[lifts.length];
        for (int i = 0; i < lifts.length; i++) {
             th[i] = new UpThread(lifts[i], panel);
             th[i].start();
        }

    }
}
